package com.zhuiyun.project.api.learnPlan.mapper;

import com.zhuiyun.project.api.learnPlan.entity.LearnContent;
import com.zhuiyun.project.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName MusicMapper
 * @Description TODO
 * @Author XMY
 * @Date 2023/12/6 16:27
 **/
@Mapper
public interface LearnPlanContentMapper extends BaseMapper<LearnContent> {

    @Select("select * from learn_plan_content where plan_id=#{planId}")
    List<LearnContent> selectByPlanId(Integer planId);

    /**
     * @Author zf
     * @Date 2024/2/22/18:50 TODO 添加学习计划内容
     * @param learnContent
     * @return List<PoetryAuthor>
     */
    @Insert("INSERT INTO learn_plan_content (plan_content,arrangement,plan_id) \n" +
            "VALUES(#{planContent},#{arrangement},#{planId})")
    int insertLearnPlanContent(LearnContent learnContent);
}
